1. Field of the Invention
The present invention relates to an electronic device, an information terminal device, and an electronic system utilizing them, and more particularly to communication control between the information terminal device and the electronic device when the information terminal device is connected.
2. Description of the Related Art
In recent years, with the ever widening use of multi-function mobile phones typified by smartphones or the like, the frequency of use of smartphones in vehicles has been increasing. A smartphone has communication functions, for example, a third generation (3G) line, a Universal Serial Bus (USB) connection, and wireless data communications, such as WiFi and Bluetooth (registered trademark). The use of these functions enables a voice call and data communication via the Internet or the like. As well as being used singly, the smartphone may be connected to an in-vehicle device and thereby may be remotely operated from the in-vehicle device, and the screen of the smartphone may be magnified and displayed on the display of the in-vehicle device.
The smartphone is connectable to the in-vehicle device by using a USB connection or other communication devices. USB is used as a standard interface for connecting between a personal computer (PC) and a peripheral device. In USB, specification groups called device classes, which are formed on the basis of the functions of peripheral devices, are defined. A unified control interface is prepared for devices made in accordance with each class specification, and devices complying with the class specification may be operated by a common device driver called a class driver. For example, a USB memory belongs to a mass storage class and may be operated without a driver being newly installed if an OS side has a class driver corresponding to the mass storage class.
In recent years, devices, such as MP3 players, implement the mass storage class, and devices, such as digital cameras, also implement a still image class, which is used when direct output to a printer is performed. Japanese Unexamined Patent Application Publication No. 2006-180356 discloses a USB peripheral device. In order to prevent a mistake in selecting a device class, when a USB host is connected, the USB peripheral device displays a desired device class among a plurality of device classes and prompts a user to select the displayed device class. In addition, in Japanese Unexamined Patent Application Publication No. 2008-152404, a user sets, among device classes supported by a USB host control unit, a connection-target class whose connection is permitted, and when a USB device is connected, the connection of only the USB device whose device class matches the connection-target class set by the user is permitted. Thus, in the case where an electronic apparatus and a plurality of device class USB devices are connected and used, a connection with an appropriate class may be made at all times.
In a smartphone, such as an Android terminal, in order to increase flexibility in a method of communication with peripheral devices, switching between functions of a USB bus enables switching to a mode that performs free communication using its own unique protocol (hereinafter referred to as a unique communication mode) (for example, Android open accessory protocol). FIG. 1 illustrates a configuration of layers of an in-vehicle device and a smartphone. Although both of an in-vehicle device 10 and a smartphone 20 may be a USB host or a USB peripheral device, the in-vehicle device 10 is the USB host and the smartphone 20 is the USB peripheral device here.
The in-vehicle device 10 includes, in sequence from a high level, an application layer 11, class driver layers 12, a USB host driver 13, a Windows Automotive 7 operating system (OS) 14, hardware 15 and so forth. On the other hand, the smartphone 20 includes, in sequence from a high level, an application layer 21, class driver layers 22, a USB device driver 23, an Android OS 24, and hardware 25. In the class driver layers 22 of the smartphone 20, for example, a mass storage class and a communication device class (NCM) are prepared. In the USB host driver 13 of the in-vehicle device 10, drivers for operating the mass storage class, the communication device class (NCM), and the like are prepared.
FIG. 2 illustrates an operation sequence performed when a USB bus is switched from a normal communication mode to a unique communication mode. When the in-vehicle device 10 and the smartphone 20 are connected with a USB cable, in the case where the in-vehicle device 10 operates as a USB host and the smartphone 20 operates as a USB peripheral device, for example, the in-vehicle device 10 transmits a music play command to the smartphone 20 and the smartphone 20 transfers audio data to the in-vehicle device 10 in response to this command. The in-vehicle device 10 outputs the received audio data by using its own amplifier and speaker.
Now, when the in-vehicle device 10 requests switching to the unique communication mode in which a unique control command may be utilized, the smartphone 20 activates a corresponding application, changes a vender ID (VID)/product ID (PID), and thereby switches the USB bus from the communication mode utilizing a normal device class to the unique communication mode. This enables communication between the in-vehicle device 10 and the smartphone 20 with a free protocol. However, because this unique communication mode is not a function implemented in a device class/class driver of an individual terminal but a special communication mode prepared on the OS side, a case may arise where a USB interface (device class) originally included by the terminal may not be able to be used. For example, a mirror link, and an operation, such as playing of a music file, may be disabled.
When the in-vehicle device 10 and the smartphone 20 are connected to each other, a mirror link has the highest priority. The mirror link causes the in-vehicle device 10 to serve just like an input/output device of the smartphone 20. The same picture as that displayed on the screen of the smartphone 20 may be magnified and displayed on the display of the in-vehicle device 10, and the smartphone 20 may be remotely operated by input via a touch panel or the like of the in-vehicle device 10.
FIG. 3A illustrates an example where the mirror link becomes disabled. Before switching to the unique communication mode, a CDC/NCM class and a CDC network data class used for the mirror link are allocated as usable USB interfaces. However, when switching to the unique communication mode is performed, the smartphone 20 erases the CDC/NCM class and the CDC network data class, and changes the classes serving as the usable USB interfaces to an Android open accessory class. Thus, the mirror link becomes disabled.
FIG. 3B illustrates an example where playing of a music file becomes disabled. Before switching to the unique communication mode, the music file of the smartphone 20 may be played by using the mass storage class as a USB interface. However, when switching to the unique communication mode is performed, the mass storage class disappears from the USB interface of the smartphone 20, and a usable class is changed to the Android open accessory class. Thus, playing of the music file becomes disabled.
FIG. 3C illustrates an example where playing of a music file and the mirror link become disabled. Before switching to the unique communication mode, the music file may be played by using the mass storage class as a USB interface, and the mirror link is enabled by the communication device class (NCM). However, when switching to the unique communication mode is performed, the mass storage class and the communication device class (NCM) disappear and are changed to the Android open accessory class, so that playing of the music file and the mirror link become disabled.
Hence, switching from a normal mode utilizing a device class, which has been prepared in advance and serves as a USB interface, to a unique communication mode using a unique protocol disables an existing function. In this case, it is desirable to evaluate functions of the normal mode and the unique communication mode and enable selection of communication using a more highly evaluated mode.
An object of embodiments of the present invention is to provide an electronic device that enables selection of either a normal mode or a unique communication mode, a communication control method of the electronic device, a communication control program of the electronic device, an electronic system, and an information terminal device.
In addition, an object of embodiments of the present invention is to provide an electronic device that enables assignment of a unique communication command to another alternative connection properly in the case where a normal mode command and the unique communication command may not be able to coexist in the same bus, a communication control method of the electronic device, and an information terminal device.